/**
 * ITmPackSerialDao.java
 * Created at 2017-2-17
 * Created by xieshuang
 * Copyright (C) 2017 BROADTEXT SOFTWARE, All rights reserved.
 */
package com.broadtext.rms.basic.dao;

import java.util.List;

import com.broadtext.common.exp.DaoException;
import com.broadtext.rms.basic.model.TmPackSerial;

/**
 * <p>ClassName: ITmPackSerialDao</p>
 * <p>Description: 电池id管理dao接口</p>
 * <p>Author: xieshuang</p>
 * <p>Date: 2017-2-17</p>
 */
public interface ITmPackSerialDao {

    /**
     * 
     * <p>Description: 查询电池对应状态数量</p>
     * @param sql 查询语句
     * @param status 状态 0:未使用，1：已使用，2：已报废
     * @return 数量
     * @throws DaoException 异常
     */
    long getStatusCount(String sql, String status) throws DaoException;

    /**
     * 
     * <p>Description: 获取电池id列表</p>
     * @param queryParam 查询参数
     * @param sql 查询语句
     * @return 电池id列表
     * @throws DaoException 异常
     */
    List<TmPackSerial> getMaxId(String sql, String queryParam) throws DaoException;

    /**
     * 
     * <p>Description: 批量插入数据</p>
     * @param sql sqlId
     * @param newPackList 待插入数据
     * @throws DaoException 异常
     */
    void insertBatch(String sql, List<TmPackSerial> newPackList) throws DaoException;

    /**
     * 
     * <p>Description: 检查待删除电池状态是否合法</p>
     * @param ids id数组
     * @return 检查结果
     * @throws DaoException 异常
     */
    Object checkPackStatus(String[] ids) throws DaoException;
    
    /** (non-Javadoc)
     * <p>Title: checkRepeatPackCode</p>
     * <p>Description: </p>
     * @param queryMap
     * @return
     * @throws DaoException
     * @see com.broadtext.rms.system.dao.IServicePlanDao#checkRepeatPlanCode(java.util.Map)
     */
    long checkRepeatPackCode(String packCode) throws DaoException;
    

}
